<?php

namespace App\Http\Controllers\Common;

use App\Helpers\ResponseData;
use App\Http\Controllers\Controller;
use App\Models\BaseConfig;
use Illuminate\Http\Request;

class BaseConfigController extends Controller
{
    use ResponseData;
    //获取基本配置

    public function index(){
        $base = BaseConfig::first();
        return $this->success($base);
    }
    public function store(Request $request,BaseConfig $model){
        //$data = $request->input();
        $model->updateOrCreate(['id'=>1],$request->all());
        return $this->success('保存成功');
    }
}
